<template>
    <p>朋友圈</p>
    <p>我的明星朋友</p>
    <p>我的小迷弟</p>
    <p>人名：{{ $route.query.name }}==={{ $route.params.username }}</p>
    {{ $route }}
</template>
<script setup>
import { useRoute,useRouter } from 'vue-router'

const route = useRoute();  //路由跳转的时候传递参数来用
const router = useRouter(); // 只是路由地址跳转
console.log(route.params.username);
// console.log(router.push());
// router.push({name:'my',query:{id:id}})

</script>
<style scoped></style>